Import pandas, PCA and Standard Scaler

PCA can give you wonky results if the variance in the original dataset is large, so we want to standardize the data. StandardScaler allows you to standardize the dataset so the mean is 0 and the variance is 1. This process is common in ML models

Load iris and take a look at the dataset

Split the dataset into X and y

Apply the standardization to the X values

Run the principal component analysis model on X

Combine the principalDf with y to get a dataframe with both the components and y

Plot the principal components vs each other (don't need to code this yourselves)

Take a look at the variance ratios for the two principal components